package test;

import org.junit.Test;

/**
 * Created by admin on 2017/2/6.
 */
public class AutomaticBoxing {
    public static void main(String[] args) {
        long s=System.currentTimeMillis();
        for(int i=0;i<100000;i++){
//            Long haha = Long.valueOf("123456");
            long haha = Long.parseLong("123456");
        }
        long e=System.currentTimeMillis();
        System.out.println("用时："+(e-s));
    }

    @Test
    public void compareLong(){
        Long a = 111111L;
        Long b = 111111L;
        System.out.println(a.longValue()==b.longValue());
    }

    @Test
    public void compareInteger(){
        Integer a = 1111;
        Integer b = 1111;
        System.out.println(a.equals(b.intValue()));
    }

}
